import axios from "./index.js";
// 登录
export const getInfo = (data) => {
  return axios.request({
    url: "/emergency/testUser/login",
    method: "post",
    data: data
  });
};

// 登录
export const getUserInfo = (data) => {
  return axios.request({
    url: "/auth/signV2/login",
    method: "post",
    data: data
  });
};

// 跳转到运行监测时获取token
export const getDdPmsToken = () => {
  return axios.request({
    url: "/docking/pms/getToken",
    method: "get"
  });
};

// 根据ISC-ticket 获取用户信息
export const getUserInfoByIscTicket = (token) => {
  return axios.request({
    url: "/auth/signV2/userInfo",
    method: "get",
    responseType: "application/json",
    headers: {
      ISCToken: token
    }
  });
};
